//request 是一个axios对象（经过设置信息的）
import request from '@/utils/request'


export function countAdmin(data) {
    return request({
        url: '/api/admin/adminCounter/countAdmin',
        //post请求
        method: 'post',
        data
    })
}

export function countUser(data) {
    return request({
        url: '/api/admin/adminCounter/countUsers',
        //post请求
        method: 'post',
        data
    })
}


export function countDish(data) {
    return request({
        url: '/api/admin/adminCounter/countDishWaiting',
        //post请求
        method: 'post',
        data
    })
}


export function listTodayOrders(data) {
    return request({
        url: '/api/admin/adminCounter/listTodayOrders',
        //post请求
        method: 'post',
        data
    })
}


export function countTodayMoney(data) {
    return request({
        url: '/api/admin/adminCounter/amountTodayOrders',
        //post请求
        method: 'post',
        data
    })
}


export function getMerchantDaysMoney(data) {
    return request({
        url: '/api/admin/adminCounter/getMerchantDaysMoney',
        //post请求
        method: 'post',
        data
    })
}

export function getMerchantOrderByMoney(data) {
    return request({
        url: '/api/admin/adminCounter/getMerchantOrderByMoney',
        //post请求
        method: 'post',
        data
    })
}

// 查询所有的不是管理员的用户
export function searchUsersNotAdmin() {
    return request({
        headers: {"Content-Type": "application/json;charset=UTF-8"},
        url: '/api/admin/adminCounter/searchUsersNotAdmin',
        //post请求
        method: 'post',
    })
}



// 添加管理员
export function addAdmin(data) {
    return request({
        url: '/api/admin/adminCounter/addAdmin',
        //post请求
        method: 'post',
        data
    })
}
